package cn.dt70.service;

import cn.dt70.pojo.AqbInvestment;
import cn.dt70.utils.PageSupport;


import java.util.Date;
import java.util.List;

public interface AqbInvestmentService {

    //灵活查询总条数
    int findByflexibleCount(Integer id,Integer querytime,Integer staus);

    //灵活查询
    List<AqbInvestment> findByflexible(Integer id,Integer querytime,Integer staus,PageSupport pageSupport) throws Exception;


    //根据用户id查询投资记录
    List<AqbInvestment> findById(Integer id) throws Exception;

    //根据用户id查询一周内的投资记录
    List<AqbInvestment> findByIdInWeek(Integer id) throws Exception;

    //根据用户id查询一月内的投资记录
    List<AqbInvestment> findByIdInMonth(Integer id) throws Exception;

    //根据用户id查询三月内的投资记录
    List<AqbInvestment> findByIdInThreeMonth(Integer id) throws Exception;

    //根据用户id查询一段时间的投资记录
    List<AqbInvestment> findByIdForTime(Integer id, Date begin, Date end, PageSupport pageSupport) throws Exception;

    //根据用户id查询一段时间的投资记录条数
    int findByIdForTimeCount(Integer id, Date begin, Date end);

    //根据用户id查询可转让债权
    List<AqbInvestment> findCreditorById(Integer id,Integer querytime) throws Exception;

    //增加投资记录
    boolean addInvestment(AqbInvestment aqbInvestment) throws Exception;

    //根据投资id查询投资
    AqbInvestment findByInvestId(Integer investmentId) throws Exception;

    //修改投资记录（债权转让后）
    boolean updateInvestment(AqbInvestment aqbInvestment) throws Exception;

    //根据状态查询投资记录
    List<AqbInvestment> findBystaus(Integer id,Integer staus) throws Exception;

    //根据用户id查询一段时间可转接的债权（满编中）
    List<AqbInvestment> queryCreditorByIdForTime(Integer id,Date begin,Date end);

}
